package cc.comac.mom.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipBenchmarkItemService;
import cc.comac.mom.bean.EquipBenchmarkBean;
import cc.comac.mom.bean.EquipBenchmarkItem;
import cc.comac.mom.bean.EquipBenchmarkItemBean;
import cc.comac.mom.util.ResultBean;

@RestController
@RequestMapping(value ="/EquipBenchmarkItem")
public class EquipBenchmarkItemController {
	@Autowired
	private EquipBenchmarkItemService equipBenchmarkItemService;
	@RequestMapping(value = "/saveBatch",method = RequestMethod.POST)
	public ResultBean save(@RequestBody EquipBenchmarkBean obj) {
			ResultBean resultBean = equipBenchmarkItemService.saveBatch(obj);
		return resultBean;
	}
	
	@RequestMapping(value = "/getById",method = RequestMethod.POST)
	public EquipBenchmarkItem getById(@RequestBody EquipBenchmarkItem obj) {
		return equipBenchmarkItemService.getById(obj);
		
	}
	
	@RequestMapping(value = "/deleteBatch",method = RequestMethod.POST)
	public ResultBean deleteBatch(@RequestBody EquipBenchmarkItemBean obj) {
		return equipBenchmarkItemService.deleteBatch(obj);
		
	}
	
	@RequestMapping(value = "/moveUp",method = RequestMethod.POST)
	public ResultBean moveUp(@RequestBody EquipBenchmarkItem obj) {
		return equipBenchmarkItemService.moveUp(obj);
		
	}
	
	@RequestMapping(value = "/moveDown",method = RequestMethod.POST)
	public ResultBean moveDown(@RequestBody EquipBenchmarkItem obj) {
		return equipBenchmarkItemService.moveDown(obj);
		
	}
		
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public EquipBenchmarkItemBean selectByCondition(@RequestBody EquipBenchmarkItem obj) {
		return equipBenchmarkItemService.selectByCondition(obj);
		
	}
}
